home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12132 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  853 b 

  1. Path: alpha1.csd.uwm.edu!gidwani
  2. From: gidwani@alpha1.csd.uwm.edu (Vinay K Gidwani)
  3. Newsgroups: comp.lang.c
  4. Subject: formatting integers
  5. Date: 29 Mar 1996 03:53:53 GMT
  6. Organization: University of Wisconsin - Milwaukee, Computing Services Division
  7. Sender: gidwani@alpha1.csd.uwm.edu
  8. Distribution: usa
  9. Message-ID: <4jfmsh$lal@uwm.edu>
  10. NNTP-Posting-Host: 129.89.169.1
  11.  
  12. I am trying to format an integer that is left justified, length of 4 and
  13. 0 filled.
  14.  
  15. I tried the following %-0*%d and typed in the length of 4, but it gave me
  16. the following output
  17.  
  18.     4.
  19.     When I try %0*d, then I get the following output.
  20.     0004. 
  21.     The length and the 0 filled in works but I cannot get it to left
  22.     justify.
  23.  
  24.     Any pointers in this would be helpful.
  25.  
  26.     My email is gidwani@alpha1.csd.uwm.edu
  27.  
  28.     Thanks
  29.  
  30.     Vinay.
  31.  
  32.  
  33. -- 
  34. email : gidwani@alpha1.csd.uwm.edu
  35.